
<html>
<head>
<%@ include file="/WEB-INF/views/includenohead.jsp" %>

<script type="text/javascript" src="${baseURL}/resources/js/jquery.min.js" ></script>  
<script type="text/javascript" src="${baseURL}/resources/js/jquery-ui.min.js" ></script>

<script src="${baseURL}/resources/js/jsCarousel-2.0.0.js" type="text/javascript"></script>
<link href="${baseURL}/resources/css/jsCarousel-2.0.0.css" rel="stylesheet" type="text/css" /> 
<link rel="stylesheet" type="text/css" href="${baseURL}/resources/css/slider.css" />

<script>
$(document).ready(function(){  
    $("#featured > ul").tabs({fx:{opacity: "toggle"}}).tabs("rotate", 5000, true);  
}); 
</script>

 <script type="text/javascript">
        $(document).ready(function() {
     
       		$('#carouselh').jsCarousel({ onthumbnailclick: function(src) {  }, autoscroll: false, circular: true, masked: false, itemstodisplay: 10, orientation: 'h' });
          });       
        
    </script>
</head>



<body>
<div id="wrapperbody"><div id="wrapper"><%@ include file="/WEB-INF/views/header.jsp" %>

<div id="headerwrap"><div id="header">
		<table id='tablabanner'>
		<tr>
		<td id='td1'>
<c:choose>
<c:when test='${publicacionSlider != null}'>

		
		
	      	
	     
	      <div id="featured" >
		  <ul class="ui-tabs-nav">
		     <c:forEach var="pub" items="${publicacionSlider}">
		        <li class="ui-tabs-nav-item" id="nav-fragment-${pub.idpublicacion }"><a href="#fragment-${pub.idpublicacion }"><img width=50 height=50 src="${pub.urlimagen }" alt="" /><span>${pub.titulo }</span></a></li>
		     </c:forEach>
		  </ul>
		  
		
		   
		    <c:forEach var="pub" items="${publicacionSlider}">		        
		        <div id="fragment-${pub.idpublicacion }" class="ui-tabs-panel" style="">
					<img src="${pub.urlimagen }" alt="" width=400 height=250 />
					 <div class="info" >
					 <c:choose>
					 <c:when test="${pub.idpublicacion_tipo eq '1' }">
					 <h2><b><a href="${baseURL}${noticiaURL}${pub.idpublicacion}" >${pub.titulo }</a></b></h2>
					<p style='font-size:9px;'></p>
					 </c:when>
					 <c:when test="${pub.idpublicacion_tipo eq '2' }">
					 <h2><b><a href="${baseURL}${eventoURL}${pub.idpublicacion}" >${pub.titulo }</a></b></h2>
						<p style='font-size:9px;'></p>
					 </c:when>
					 </c:choose>
					 
						
					 </div>
			    </div>
		     </c:forEach>
		     
		    
		 </div>
		
</c:when>
</c:choose>		
	
		
		</td>
		<td id='td2'>
		
		${propaganda.publicidad[0].cuerpo}
		
				
		
		</td>
		</tr>
		</table>
</div></div>
<div id="contentwrap"><div id="content">
<br>
<div style='margin:0 auto 0 auto;text-align:center;'>
<div id="carouselh">

<c:forEach var="evento" items="${eventos}">
<div>
<a href='${baseURL}${eventoURL}${evento.idevento}'>
<img alt="" src="${evento.publicacion.urlimagen }" /><br />
</a>

<div class="thumbnail-text">
<c:choose>
<c:when test="${evento.estado eq '1' }">
<span style='color:#6DA473;'>
</c:when>
<c:otherwise>
<span style='color:#A46D6D;'>
</c:otherwise>
</c:choose>
${evento.nombre }
</span></div></div>
</c:forEach>
</div>
</div>
   <br>
<table id='tablabanner'>
		<tr>
		<td id='td1' style='padding-left:25px;vertical-align:top;'> 
<form:form method="post" action="${baseURL}/index" commandName="formjuego">		  
<div class="slideshow" style='height:480px;'>
    <div class="slide">
        <input type="radio" id="tab-1" name="tab-group-1" checked style='visibility:hidden;'>
        <label for="tab-1">Individual</label>
        <div class="content">
            <form:select path="juego1" items="${listadojuegos}" class='cajaselec' onchange='document.getElementById("formjuego").submit();'  />
        
        <c:choose>
         <c:when test="${fn:length(rank1) > 0}">
          <table class='CSSTableGenerator' width=400>
         	<tr>
         		
         		<td width=50>Ranking</td>
         		<td width=25></td>
         		<td width=200>Player</td>
         		<td width=100>Puntos</td>
         	</tr>
		         <c:forEach  varStatus="index"  var="rank" items="${rank1}">
		         <tr  style='cursor:pointer;' onclick='location.href="${baseURL}/player/perfil?id=${rank.idusuario}"'>
		          <td style='text-align:center'>${index.index+1}</td>
		         <td>
		       <c:choose>
         		<c:when test="${empty rank.urlimagen }">
         		<img src="${baseURL}/resources/images/no.jpg" width='25' height='25' >
		      </c:when>
		      <c:otherwise>
		      <img src="${rank.urlimagen}" width='25' height='25' >
		      </c:otherwise>
		      </c:choose>
		         </td>
		  		
		  		 <td>${rank.username}</td>
		  		 <td>${rank.puntos} Pts.</td>
		         </tr>
		         </c:forEach>
          </table>
          </c:when>
         <c:otherwise>
        
         <br><br>
        <div style='text-align:center;'>
         <br><br><br><br><h1>Raking sin Players</h1><br><br>
         </div>
         
         </c:otherwise>
         </c:choose>
        
           
        </div>

    </div>
    <div class="slide">
        <input type="radio" id="tab-2" name="tab-group-1" style='visibility:hidden;' >
        <label for="tab-2">Equipos</label>
        <div class="content">
            <form:select path="juego2" items="${listadojuegos}" class='cajaselec' onchange='document.getElementById("formjuego").submit();' />
          <c:choose>
         <c:when test="${fn:length(rank2) > 0}">
          <table class='CSSTableGenerator' width=400>
         	<tr>
         		
         		<td width=50>Ranking</td>
         		<td width=25></td>
         		<td width=200>Player</td>
         		<td width=100>Puntos</td>
         	</tr>
		         <c:forEach  varStatus="index"  var="rank" items="${rank2}">
		         <tr style='cursor:pointer;' onclick='location.href="${baseURL}/player/perfil?id=${rank.idusuario}"'>
		          <td style='text-align:center'>${index.index+1}</td>
		         <td>
		       <c:choose>
         		<c:when test="${empty rank.urlimagen }">
         		<img src="${baseURL}/resources/images/no.jpg" width='25' height='25' >
		      </c:when>
		      <c:otherwise>
		      <img src="${rank.urlimagen}" width='25' height='25' >
		      </c:otherwise>
		      </c:choose>
		         </td>
		  		
		  		 <td>${rank.username}</td>
		  		 <td>${rank.puntos} Pts.</td>
		         </tr>
		         </c:forEach>
          </table>
          </c:when>
         <c:otherwise><br><br>
        <div style='text-align:center;'>
         <br><br><br><br><h1>Raking sin Players</h1><br><br>
         </div>
         </c:otherwise>
         </c:choose>
          
          
          
        </div>
    </div>
</div>
</form:form>
		
		</td>
		<td id='td2' style='vertical-align:top;'><br><br>${propaganda.publicidad[1].cuerpo}<br><br>
		<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top">
<input type="hidden" name="cmd" value="_donations">
<input type="hidden" name="business" value="pmunoz@siisa.com">
<input type="hidden" name="lc" value="CL">
<input type="hidden" name="no_note" value="0">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-DonationsBF:paypal-donate-button.jpg:NonHostedGuest">
<input type="image" width='250' src="http://coachesacrosscontinents.files.wordpress.com/2013/11/paypal-donate-button.jpg" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
		
		<td>
		</tr>
		<tr><td colspan=2 style='text-align:center;'><br><br>${propaganda.publicidad[2].cuerpo}</td></tr>
		</table>
   <br><br>
    
 
   
</div></div> 
 
   
  </div></div>
   <%@ include file="/WEB-INF/views/fooder.jsp" %> 
  </body>

</html>